Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Add Exceptions\Handler::mapLogLevel(...) so the logic can be easily overridden #52666

Merged

Conversation

taka-oyama
Copy link
Contributor

@taka-oyama taka-oyama commented Sep 6, 2024

I would like to customize the level mapping logic in the exception handler but currently I have to override the entire reportThrowable to do so. Extracting the log level mapping logic as a new method mapLogLevel would allow me to override the method to add the custom logic I need.

Specifically, I would like use this change to add a logic that will lower the log level of QueryException when the underlying exception inherits a certain class.

@taylorotwell taylorotwell merged commit bb670ae into laravel:11.x Sep 6, 2024
15 of 27 checks passed
@taka-oyama taka-oyama deleted the feat/add-exception-level-method branch September 7, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants